<cfquery name="get_order" datasource="#DSN1#">
	select	*
	FROM	customer_orders, customers, ref_order_status
	where	customers.customer_id=customer_orders.customer_id
	and		customer_orders.order_status_code=ref_order_status.order_status_code
	and		order_id = '#order#'
</cfquery>
<cfoutput query="get_order">
	<h1>Order #Order_id#</h1>
	<table width="100%">
		<tr>
			<th>Name:</th>
			<td>#Customer_name#</td>
			<td>&nbsp;</td>
			<th>Placed:</th>
			<td>#order_placed_datetime#</td>
		</tr>
		<tr>
			<th>Address:</th>
			<td>#Customer_address_1#
				<cfif Len(trim(Customer_address_2)) GT 1>
					<br />#Customer_address_2#
				</cfif>
				<br />#customer_city#
				<cfif Len(trim(customer_state)) GT 0>
					, #customer_state#
				</cfif>
				<cfif Len(trim(customer_postal_code)) GT 0>
					&nbsp;&nbsp;&nbsp;&nbsp;#customer_postal_code#
				</cfif>
			</td>
			<td colpan="3">&nbsp;</td>
		</tr>
	</table>
</cfoutput>